<template>
  <dv-scroll-ranking-board :config="config"/>
</template>
<script>
import { getPopularAuthor } from '@/api/dataECharts'

export default {
  data() {
    return {
      list: [],
      config: {
        data: []
      }
    }
  },
  methods: {
    async getList() {
      let data = await getPopularAuthor()
      for (const item in data) {
        this.list.unshift({ name: item, value: data[item] })
      }
      this.config.data = [...this.list]
      this.config = {...this.config}
    }
  },
  mounted() {
    this.getList()
  }
}

</script>

<style scoped lang="scss">
.dv-scroll-ranking-board {
  width: 80%;
}
</style>
